package com.grad.why.studentsystem.util;

import com.grad.why.studentsystem.domain.current.CurrentStudentEvaluateInfo;

import java.util.Comparator;

public class MyStudentEvaluateCompareble implements Comparator<CurrentStudentEvaluateInfo> {
    @Override
    public int compare(CurrentStudentEvaluateInfo o1, CurrentStudentEvaluateInfo o2) {
        return getFlag(o1.getAve(),o2.getAve());
    }

    public int getFlag(float f1,float f2){
        if(f2 >= f1){
            return 1;
        }else{
            return -1;
        }
    }
}
